// 把?name=mumu&age=18
// 转换为{name:"mumu",age:18}
// ?redirect=/admin/orderlist&flag=true
export function parse (url){
  var temp =url.slice(1).split("&");
  var search = {};
  for(var i=0;i<temp.length;i++){
   var item = temp[i].split("=");
   search[item[0]] = item[1];
  }
  return search;
}